package cn.clwxy.gdz.controller.personnao;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.http.impl.bootstrap.HttpServer;

import cn.clwxy.gdz.bo.TeacherInfoBean;
import cn.clwxy.gdz.dao.TeacherAddressDao;
import cn.clwxy.gdz.dao.TeacherAddressDaoImpl;
import cn.clwxy.gdz.dao.TeacherDao;
import cn.clwxy.gdz.dao.TeacherDaoImpl;
import cn.clwxy.gdz.util.JsonSerializeHelper;
@WebServlet(urlPatterns={"/FindTeacherAddressIdServlet"})
public class FindTeacherAddressIdServlet extends HttpServlet{
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		
		Integer id=(Integer)request.getSession().getAttribute("id");
		TeacherAddressDao teacherInfoBean=new TeacherAddressDaoImpl();
		Integer addressId=teacherInfoBean.findTeacherAddressIdByTeacherId(id);
		
		System.out.println("修改数量："+addressId);
		response.getWriter().write(String.valueOf(addressId));
	}
}
